<!-- 网点导航 -->
<template>
	<view class="outlet">
		<!-- <view class="" @click="toPage(search_url)"> -->
		<outletSearch ></outletSearch>
		<!-- </view> -->
		<!-- 轮播图 -->
		<view class="banner">
			<banner-list :banners="base_info.bannerfoods" background="#FF504C" :heightFix="true" swiperHeight="240rpx">
			</banner-list>
		</view>
		<!-- 推荐网点 -->
		<view class="advise">
			<view class="left">
				<view class="title">推荐网点</view>
				<view class="type">已关注</view>
			</view>
			<view class="right">
				<image src="/static/img/common_ic_05.png"  ></image>
				<view class="map">地图</view>
			</view>
		</view>
		<!-- 列表 -->
		<view class="card-box">
			<view class="card" v-for="(item,index) in cards" :key="item.id">
				<view class="label">
					<cover-view class="info">
						<cover-view class="name">深圳天健世纪支行</cover-view>
						<cover-view class="tag">休息中</cover-view>
					</cover-view>
					<cover-view class="icons">
						<cover-image class="icon" src="@/static/img/ic_dial.png"></cover-image>
						<cover-image class="icon" src="@/static/img/ic_current_location.png" v-if="collection"></cover-image>
					</cover-view>
				</view>
				<view class="value">
					<view class="distance">
						<image class="distance-icon" src="@/static/img/ic_positioning.png"></image>
						<view>距离0m</view>
					</view>
					<view class="distance">
						<image class="distance-icon" src="@/static/img/ic_walk.png"></image>
						<view>步行0分钟</view>
					</view>
					<view class="distance">
						<image class="distance-icon" src="@/static/img/ic_drive.png"></image>
						<view>开车0分钟</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	import {
		mapMutations,
		mapActions,
		mapState,
		mapGetters
	} from 'vuex';
	import outletSearch from 'pages/outlets/components/outlet-search.vue'
	export default {
		components: {
			outletSearch
		},
		computed: {
			// 获取vuex 数据
			...mapState({
				base_info: state => state.init.goods_detail.base_info, // banner信息 - 商品基本信息
			}),
		},
		data() {
			return {
				show: true,
				search_url: "/pages/outlets/search/index",
				collection: false,
				cards: [
					{
						id: 0,
						name: "深圳天健世纪支行",
						status: "休息中",
						distance: 0,
						walk: 0,
						drive: 0,
					},
					{
						id: 1,
						name: "深圳天健世纪支行",
						status: "休息中",
						distance: 0,
						walk: 0,
						drive: 0,
					},
					{
						id: 2,
						name: "深圳天健世纪支行",
						status: "休息中",
						distance: 0,
						walk: 0,
						drive: 0,
					},
				],
			};
		},
		mounted() {},
		methods: {
			toPage(val) {
				uni.navigateTo({
					url: val
				})
			},
		}

	};
</script>

<style scoped lang="scss">
	@import './index.scss';
</style>
